home *** CD-ROM | disk | FTP | other *** search
- <SCRIPT LANGUAGE="VBScript" RUNAT="Server">
- '+-------------------------------------------------------------------------
- '
- ' Microsoft Windows Media
- ' Copyright (C) Microsoft Corporation. All rights reserved.
- '
- ' File: Global.asp
- '
- ' Contents: initializes the session state
- '
- '--------------------------------------------------------------------------
-
-
- '////////////////////////////////////////////////////////////////
- Sub Appplication_OnStart
- Application( "strLocalHostName" ) = Empty
- Application( "strLocalHostNameFullyQualified" ) = Empty
- Application( "strHostIPAddress" ) = Request.ServerVariables( "LOCAL_ADDR" )
- Application( "bLocalHostHasWMS" ) = Empty
- end sub
-
-
- '////////////////////////////////////////////////////////////////
- Sub Session_OnStart
- on error resume next
- Set Session("WMSAdmin") = Server.CreateObject("WMSAdminRemote.ASPAdmin")
-
- Session( "BaseHREF" ) = ""
-
- ' init vars used in error handling code (see Error.asp)
- Session( "ErrorNumber" ) = 0
- Session( "ErrorCulprit" ) = ""
- Session( "ErrorDescription" ) = ""
- Session( "PageReloadedToDisplayError" ) = 0
-
- ' work-around a strange bug whereby session state is lost after long periods of inactivity
- session.timeout = 60
-
- ' init var governing state of the showAll checkbox on the server's plugins page
- Session( "ShowAllPluginCategories" ) = FALSE
-
- ' init vars governing state of the checkboxes in Server_Diag.asp
- Session( "CBTroubleshootingLimitHits" ) = TRUE
- Session( "CBTroubleshootingPluginWarnings" ) = TRUE
- Session( "CBTroubleshootingPluginErrors" ) = TRUE
- Session( "CBTroubleshootingServerWarnings" ) = TRUE
- Session( "CBTroubleshootingServerErrors" ) = TRUE
-
- ' init default value for the refresh timer found in the gutter of several pages
- Session( "RefreshRate" ) = 60
-
- Session( "LocalHostWinName" ) = ""
-
- Session( "Initialized" ) = FALSE
- Session( "ServerStoppedRedirect" ) = FALSE
- Session( "ShowServerList" ) = TRUE
- Session( "ConnectionFailure" ) = FALSE
- Session( "DisplayMcastWarning" ) = FALSE
-
- ' use when adding / deleting pubpoints and enabling / disabling plug-ins
- Session( "bUpdateTreeView" ) = FALSE
-
- ' used to track contents of framesets so that F5 works intuitively
- Dim curPageDictionary
- Set Session( "CurrentPage" ) = Server.CreateObject("Scripting.Dictionary")
- curPageDictionary = Session( "CurrentPage" )
- curPageDictionary.CompareMode = 1
- curPageDictionary.Add "default", "server_status.asp"
-
- ' used as a hash table of server names for security (obfuscation of the server name in the URL)
- Dim serverDictionary
- Set Session( "SvrDictionary" ) = Server.CreateObject("Scripting.Dictionary")
- Set serverDictionary = Session( "SvrDictionary" )
- serverDictionary.CompareMode = 1
-
- ' sniff the browser as few times as possible, since it won't change from session to session
- Session( "BrowserType" ) = CInt( 0 ) 'brUnknown -- as defined in WMSConstants.asp
- Session( "BrowserVersion" ) = CStr( "" )
- Session( "UserAgent" ) = CStr( "" )
- Session( "cssName" ) = CStr( "" )
-
- ' cached server connection
- Set Session( "objCachedServer" ) = Empty
- Set Session( "objCachedPP" ) = Empty
- Session( "strCachedServerName" ) = ""
- Session( "strCachedPPID" ) = ""
- Session( "dwCachedServerStatus" ) = -1
-
- ' Set locale
- Session.LCID = "&H0409"
-
- ' use UTF-8 for encoding. See also the @CODEPAGE statement at the top of locstrings.h
- Session.CodePage = 65001
- End Sub
-
- '////////////////////////////////////////////////////////////////
- Sub Session_OnEnd
- Set Session("WMSAdmin") = Nothing
- Set Session( "CurrentPage" ) = Nothing
- Set Session( "CurrentPage" ) = Nothing
- Set Session( "SvrDictionary" ) = Nothing
-
- Session( "BaseHREF" ) = ""
- Session( "ErrorNumber" ) = 0
- Session( "ErrorCulprit" ) = ""
- Session( "ErrorDescription" ) = ""
- Session( "PageReloadedToDisplayError" ) = 0
- Session( "ShowAllPluginCategories" ) = FALSE
- Session( "CBTroubleshootingLimitHits" ) = TRUE
- Session( "CBTroubleshootingPluginWarnings" ) = TRUE
- Session( "CBTroubleshootingPluginErrors" ) = TRUE
- Session( "CBTroubleshootingServerWarnings" ) = TRUE
- Session( "CBTroubleshootingServerErrors" ) = TRUE
- Session( "LocalHostWinName" ) = ""
- Session( "Initialized" ) = FALSE
- Session( "ServerStoppedRedirect" ) = FALSE
- Session( "ShowServerList" ) = TRUE
- Session( "ConnectionFailure" ) = FALSE
- Session( "DisplayMcastWarning" ) = FALSE
- Session( "bUpdateTreeView" ) = FALSE
- Session( "BrowserType" ) = 0
- Session( "BrowserVersion" ) = ""
- Session( "UserAgent" ) = ""
- Session( "cssName" ) = ""
-
- Set Session( "objCachedServer" ) = Nothing
- Set Session( "objCachedPP" ) = Nothing
- Session( "strCachedServerName" ) = ""
- Session( "strCachedPPID" ) = ""
- Session( "dwCachedServerStatus" ) = -1
- End Sub
- </SCRIPT>
-
-